/* 
 * File:   form_piecewise_linear_function.h
 * Author: dima
 *
 * Created on 14 Январь 2015 г., 15:54
 */

#ifndef _FORM_PIECEWISE_LINEAR_FUNCTION_H
#define	_FORM_PIECEWISE_LINEAR_FUNCTION_H


#include <QDialog>
namespace Ui {
    class form_piecewise_linear_function;
}
namespace ipd {
    class ipd_img;
    class ipd_piecewise_linear_function;
}
class widget_curve_mouse;

class form_piecewise_linear_function : public QDialog {
    Q_OBJECT
public:
    form_piecewise_linear_function(ipd::ipd_img &img);
    virtual ~form_piecewise_linear_function();
    void init(); // initialization class 
    inline ipd::ipd_img* get_convert_image(); //Get convertible image
private slots:
    void convert_image(); // convert image
    void update_data(int index, double x, double y); // update the data for the curve
signals:
    void send_image(ipd::ipd_img &img);
private:
    Ui::form_piecewise_linear_function *widget;
    widget_curve_mouse *curve;
    ipd::ipd_img &original_image;
    ipd::ipd_img *convert_img;
    ipd::ipd_piecewise_linear_function *piecewise_linear_function;
};
ipd::ipd_img* form_piecewise_linear_function::get_convert_image() //Get convertible image
{
return convert_img;
}
#endif	/* _FORM_PIECEWISE_LINEAR_FUNCTION_H */
